﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace simplewebcms.Core.DomainObjects
{
    public class CMSLayout
    {
        /// <summary>
        /// The name of this layout.  It is used to
        /// key it in which pages use it, and must be
        /// unique for the entire site.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// When the layout section was created.
        /// </summary>
        public DateTime CreatedOn { get; set; }

        /// <summary>
        /// When the layout section was last changed.
        /// </summary>
        public DateTime LastChangedOn { get; set; }

        /// <summary>
        /// The unique filemask used to store the versions
        /// of the layout on the disk. A file mask of 
        /// 'layout_*.html' would match 'layout_001.html',
        /// 'layout_002.html',etc.
        /// </summary>
        public string VersionCodeFileMask { get; set; }

        /// <summary>
        /// The name of the file to use in the layout 
        /// on the page.
        /// </summary>
        public string CurrentVersionCode { get; set; }
        
        List<string> _cssIncludes;
        /// <summary>
        /// A collection of css files used by this layout
        /// </summary>
        public List<string> CssInclude
        {
            get
            {
                if (_cssIncludes == null) _cssIncludes = new List<string>();
                return _cssIncludes;
            }
        }        
        
        List<string> _javascriptIncludes;
        /// <summary>
        /// A collection of javascript files used by this layout
        /// </summary>
        public List<string> JavascriptInclude
        {
            get
            {
                if (_javascriptIncludes == null) _javascriptIncludes = new List<string>();
                return _javascriptIncludes;
            }
        }
   
    }
}
